import { ca } from 'element-plus/es/locales.mjs'

export class AdminInfoModel {
  id: number
  skills: string[]
  desc: string

  constructor(id: number, skills: string[], desc: string) {
    this.id = id
    this.skills = skills
    this.desc = desc
  }
}

export class ProjectExperienceModel {
  id: number
  year: string
  name: string
  desc: string
  imageUrl: string

  constructor(id: number, year: string, name: string, desc: string, imageUrl: string) {
    this.id = id
    this.year = year
    this.name = name
    this.desc = desc
    this.imageUrl = imageUrl
  }
}

export class WebsiteInfoModel {
  desc: string
  time: string
  runDay: number
  postCount: number

  constructor(desc: string, time: string, runDay: number, postCount: number) {
    this.desc = desc
    this.time = time
    this.runDay = runDay
    this.postCount = postCount
  }
}

export class GameCarouselPictureModel {
  Id: number
  ImageUrl: string

  constructor(id: number, imageUrl: string) {
    this.Id = id
    this.ImageUrl = imageUrl
  }
}

export class GameVideoModel {
  id: number
  name: string
  videoLink: string
  isActive: boolean

  constructor(id: number, name: string, vedioSource: string, isActive: boolean = false) {
    this.id = id
    this.name = name
    this.videoLink = vedioSource
    this.isActive = isActive
  }
}

export class TgaGameModel {
  id: number
  name: string
  country: string
  desc: string
  awardTime: string
  publishTime: string
  cover: string
  video: string

  constructor(
    id: number,
    name: string,
    country: string,
    desc: string,
    awardTime: string,
    publishTime: string,
    cover: string,
    vedio: string,
  ) {
    this.id = id
    this.name = name
    this.country = country
    this.desc = desc
    this.awardTime = awardTime
    this.publishTime = publishTime
    this.cover = cover
    this.video = vedio
  }
}

export class ShowModel {
  id: number
  name: string
  top: number
  year: number
  score: number
  cover: string
  link: string

  constructor(
    id: number,
    name: string,
    top: number,
    year: number,
    score: number,
    cover: string,
    link: string,
  ) {
    this.id = id
    this.top = top
    this.name = name
    this.year = year
    this.score = score
    this.cover = cover
    this.link = link
  }
}

export class BookModel {
  id: number
  name: string
  author: string
  brief: string
  content: string
  cover: string

  constructor(
    id: number,
    name: string,
    author: string,
    brief: string,
    content: string,
    cover: string,
  ) {
    this.id = id
    this.name = name
    this.author = author
    this.brief = brief
    this.content = content
    this.cover = cover
  }
}

export class HotMovieModel {
  id: number
  name: string
  desc: string
  cover: string

  constructor(id: number, name: string, desc: string, cover: string) {
    this.id = id
    this.name = name
    this.desc = desc
    this.cover = cover
  }
}

export class ProjectCarouselModel {
  Id: number
  Title: string
  Desc: string
  Image: string
  IsShow: boolean

  constructor(id: number, title: string, desc: string, image: string, isShow: boolean = false) {
    this.Id = id
    this.Title = title
    this.Desc = desc
    this.Image = image
    this.IsShow = isShow
  }

  static Init(): Array<ProjectCarouselModel> {
    const result = new Array<ProjectCarouselModel>()

    result.push(
      new ProjectCarouselModel(
        1,
        '未来规划',
        '目前规划，如果可以的话可能接入一下AI。',
        '/img/project/header_plan.png',
        true,
      ),
    )
    result.push(
      new ProjectCarouselModel(
        2,
        'NetCore',
        'ASP.NET Core 是一个跨平台的高性能开源框架，用于生成启用云且连接 Internet 的新式应用。数百万开发人员在使用或使用过 ASP.NET 4.x 创建 Web 应用。 ASP.NET Core 是对 ASP.NET 4.x 的重新设计，其中包括体系结构上的更改，产生了更精简、更模块化的框架。',
        '/img/project/header_netcore.png',
      ),
    )
    result.push(
      new ProjectCarouselModel(
        3,
        'Vue+TS',
        'Vue (发音为 /vjuː/，类似 view) 是一款用于构建用户界面的 JavaScript 框架。它基于标准 HTML、CSS 和 JavaScript 构建，并提供了一套声明式的、组件化的编程模型，帮助你高效地开发用户界面。无论是简单还是复杂的界面，Vue 都可以胜任。',
        '/img/project/header_vue.png',
      ),
    )

    return result
  }
}

export class AbilityModel {
  id: number
  name: string
  percent: number

  constructor(id: number, name: string, percent: number) {
    this.id = id
    this.name = name
    this.percent = percent
  }
}

export class ProjectModel {
  id: number
  name: string
  desc: string
  category: string
  link: string

  constructor(id: number, name: string, desc: string, category: string, link: string) {
    this.id = id
    this.name = name
    this.desc = desc
    this.category = category
    this.link = link
  }
}

export class CategoryProjectModel {
  category: string
  projects: Array<ProjectModel>

  constructor(category: string, projects: Array<ProjectModel>) {
    this.category = category
    this.projects = projects
  }
}
